<?php

namespace app\libs\TongtuSDK\Action;

use app\libs\TongtuSDK\TongTuClient;

class ShipppingApi extends TongTuClient
{
    public function shoppingMethod($warehouseId)
    {
        return self::post(
            '/openapi/tongtool/getShippingMethod',
            [
                'query'=>[
                    'merchantId'=>self::MERCHANT_ID,
                    'pageNo'=>1,
                    'pageSize'=>100,
                    'warehouseId'=>$warehouseId
                ],
            ]
        );
    }

    public function warehouseQuery($pageNo = 1,$pageSize = 100)
    {
        return self::post(
            '/openapi/tongtool/warehouseQuery',
            [
                'query'=>[
                    'merchantId'=>self::MERCHANT_ID,
                    'pageNo'=>$pageNo,
                    'pageSize'=>$pageSize
                ],
            ]
        );
    }
}
